// getters 也是声明变量的地方 ---  相当于计算属性
const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  // token: state => state.user.token,
  // avatar: state => state.user.avatar,
  // name: state => state.user.name
  // name: function(state) {
  //   // 语法：state.模块名.变量名
  //   return state.user.suerInfo.username
  // }
  // 简写
  name: state => state.user.userInfo.username,
  avatar: state => state.user.userInfo.staffPhoto,
  menus: state => state.user.userInfo.roles.menus

}
export default getters
